import { userLogin, getInfo } from './axiosFun'

// 登录
export const login = (params) => {
  return userLogin('post', 'login', params)
}

// 注册获取验证码
export const getCode = (params) => {
  return userLogin('post', 'sendCodeEmail', params)
}

// 注册和找回密码请求
export const getAccount = (params) => {
  return userLogin('post', 'userRegister', params)
}

// 获取报考科目
export const getTestTitle = () => {
  return getInfo('get', 'startingExam')
}

// 发起报名
export const signUpExam = (params) => {
  return getInfo('post', 'signUpExam', params)
}

// 完善学生个人信息
export const completeInfo = (params) => {
  return getInfo('post', 'completeInfo', params)
}

// 获取学生数据
export const info = (params) => {
  return getInfo('post', 'SGetCard', params)
}

// 获取全部考场信息
export const getAllClassInfo = () => {
  return getInfo('post', 'AllRoom')
}

// 删除单个教室
export const deleteOneRoom = (params) => {
  return getInfo('post', 'deleteOneRoomInfo?rid=' + params)
}

// 删除全部教室
export const deleteAllRoom = () => {
  return getInfo('post', 'deleteAllRoomInfo')
}

// 分配教室作为考场
export const setUpClassRoom = (params) => {
  return getInfo('post', 'setUpClassRoom', params)
}

// 获取可用考场信息
export const getAllUseClassInfo = () => {
  return getInfo('post', 'AllUseRoom')
}

// 教室状态请求的提交
export const updateRoomInfo = (params) => {
  return getInfo('post', 'updateRoomInfo', params)
}

// 添加教室信息
export const addClassInfo = (params) => {
  return getInfo('post', 'SaveRoom', params)
}

// 获取所有考试（专升本 .... ）信息
export const getExamInfoAndCourse = (params) => {
  return getInfo('post', 'AllExamInfoAndCourse', params)
}

// 添加考试（专升本 .... ）信息
export const addExamInfo = (params) => {
  return getInfo('post', 'AddExam', params)
}

// 修改考试（专升本 .... ）信息
export const updateExamInfo = (params) => {
  return getInfo('post', 'UpdateExam', params)
}

// 删除考试 （专升本 .... ）
export const deleteExamInfo = (params) => {
  return getInfo('post', 'deleteExam', params)
}

// 获取专业考试信息
export const getMajorExamInfo = (params) => {
  return getInfo('post', 'getCourseAndSubject', params)
}

// 获取所有专业名称
export const getAllMajorName = () => {
  return getInfo('get', 'selectSpecialities')
}

// 新增专业
export const addMajor = (params) => {
  return getInfo('post', 'addSpecialities', params)
}

// 获取考试项目信息 专升本，期末
export const getExamProjectInfo = () => {
  return getInfo('post', 'AllExamInfo')
}

// 修改考试信息
export const modiExamInfo = (params) => {
  return getInfo('post', 'updateSubject', params)
}

// 修改准考证信息
export const modiStuCardInfo = (params) => {
  return getInfo('post', 'editCardInfo', params)
}

// 获取考生信息
export const getAllStuinfo = (eno, params) => {
  return getInfo('post', 'AllStudent/' + eno, params)
}

// 搜索考生请求
export const searchStu = (params) => {
  return getInfo('post', 'selectByNameorCardno', params)
}

// 修改考生信息
export const modiStuInfo = (params) => {
  return getInfo('post', 'changeStudent', params)
}

// 删除 考试信息
export const deleteInfo = (params) => {
  return getInfo('post', 'deleteSubject', params)
}

// 添加考试科目
export const addSubjectInfo = (params) => {
  return getInfo('post', 'addSubject', params)
}

// 编辑专业信息
export const modiCourseInfo = (params) => {
  return getInfo('post', 'UpdateCourse', params)
}

// 删除专业
export const deleteCourseInfo = (params) => {
  return getInfo('post', 'deleteCourse', params)
}

// 获取所有考场信息
export const getAllExamRoom = (params) => {
  return getInfo('post', 'selectAllExamRoom', params)
}

// 搜索考场
export const searchExamRoom = (params) => {
  return getInfo('post', 'selectExamRoomByerNo', params)
}

// 生成准考证
export const generateCard = (params) => {
  return getInfo('post', 'GeneratedCards', params)
}

// 生成考场
export const CreatExamRoom = (params) => {
  return getInfo('post', 'CreatExamRoom', params)
}
